App({
  onLaunch() {
    wx.getSetting({
      success: res => {
        if (res.authSetting['scope.userInfo']) {
          this.globalData.isAuthorization = true;
          wx.getUserInfo({
            lang: "zh_CN",
            success: res => {
              this.globalData.userInfo = res.userInfo;
            }
          });
        };
      }
    });
  },

  globalData: {
    isAuthorization: false,
    userInfo: {}
  }
})